package 进阶.IO.字符流.输入流;

import java.io.FileReader;
import java.io.IOException;

public class demo01_read {
    public static void main(String[] args) throws IOException {
        FileReader fr = new FileReader("d:/a.txt");

        /*int read = 0;
        while ((read = fr.read()) != -1){
            System.out.println((char) read);
        }*/

        char[] read = new char[1024];
        int l = 0;
        while ((l = fr.read(read)) != -1){
            System.out.println(new String(read,0,l));
        }
        fr.close();
    }
}
